package cn.datawin.dockerclient.feign;

import cn.datawin.common.core.constant.ServiceNameConstants;
import cn.datawin.common.core.util.R;
import cn.datawin.dockerclient.dto.ActiveDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author lengleng
 * @date 2018/9/4
 */
@FeignClient(value = ServiceNameConstants.DOCKER_CLIENT_SERVICE)
public interface RemoteDockerService {


	@GetMapping("/test")
	R test();

	@RequestMapping(value = "/active", method = RequestMethod.POST, name = "激活某一个镜像")
	R active(@RequestBody ActiveDto activeDto);

	@RequestMapping(value = "/stop", method = RequestMethod.GET, name = "停止某一个容器")
	R stop(@RequestParam int dockerinfo_id);

	@RequestMapping(value = "/restart", method = RequestMethod.POST, name = "重新开始某一个容器")
	R restart(@RequestParam int dockerinfo_id);

	@RequestMapping(value = "/remove", method = RequestMethod.POST, name = "销毁某一个容器")
	R remove(@RequestParam int dockerinfo_id);
	@RequestMapping(value = "/reborn", method = RequestMethod.POST, name = "激活某一个镜像")
	R reborn(@RequestParam int dockerinfo_id);
}
